home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
S-Sound and Music
/
(c)sb.d64
/
music menu.c
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
5KB
|
185 lines
1 GOTO9
2 ************************************* 3 * THIS PROGRAM WILL SEARCH A DISK *
3 * FOR MASTER COMPOSER FILES, LIST *
4 * THEM FOR PLAYING, AND BUILD A *
5 * DIRECTORY ON DISK FOR LATER USE *
6 * WRITTEN 01/21/85 *
7 * DAVE SCHMOLDT 72356,2574 *
8 *************************************
9 IFF=0THENPOKE55,96:POKE56,109
10 PRINTCHR$(14)
11 IFF=1THENSYS30120:GOTO14
12 DIMPR$(145),PL$(50),PN$(50)
13 PRINT"[147]";
14 POKE53280,0:POKE53281,0
15 IFF=0THENFORS=55296TO55335:POKES, 0:POKES+960,0 : NEXT
16 IFF=0THENFOR S=1024TO1063:POKES,160:POKES+960,160:NEXT
17 IFF=0THEN PRINT"[144]";:A$=" [212]HE [205]AGIC [205]USIC [205]ACHINE ":GOSUB62
18 IFF=0THENPRINT "[144]";
19 IFF=1THEN21
20 PRINT"";:A$=" BY [196]AVE [211]CHMOLDT 72356,2574 ":GOSUB62
21 PRINT""
22 FORZ=1TO5
23 Q=0
24 FORS=55296TO55335:CO=INT(1+RND(1)*14):POKES,CO:POKES+(999-Q),CO:Q=Q+2: NEXT
25 NEXTZ
26 IFF=0THEN GOSUB139
27 PRINT"";
28 IFF=0THEN GOSUB66
29 PRINT"[146]";:F=1
30 IFRIGHT$(PT$,2)=".C"THENPT$=LEFT$(PT$,LEN(PT$)-2)
31 PRINT"";:A$=" ":GOSUB62
32 PRINT"";:A$=" ":GOSUB62
33 PRINT"[145]";
34 PRINT"";:A$="[158][206]OW [208]LAYING--> "+PT$:GOSUB62
35 GOTO38
36 GOTO27
37 END
38 A$="[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
39 PRINT"";:CO=149
40 D$=""+""
41 U$="[145][145][145][145][145][145][145][145][145][145][145][145][145][145][145][145][145][145][145][145][145][145][145][145][145][145]"+""
42 FORC=1TO11
43 CO=INT(1+RND(1)*14):POKE646,CO
44 PRINTLEFT$(D$,C+1);:PRINTA$;
45 PRINT"";
46 PRINTLEFT$(U$,C);:PRINTA$;
47 GETRE$:IFRE$=" "THENPOKE31044,4:R=0::GOSUB51 : GOTO100
48 NEXT C:DB=FRE(0):PRINT"";
49 IFPEEK(789)<>234THENGOTO42
50 GOTO100
51 A$=" "
52 PRINT"";
53 D$=""
54 U$="[145][145][145][145][145][145][145][145][145][145][145][145][145][145][145][145][145][145][145][145][145][145][145][145][145][145]"
55 FORC=1TO12
56 PRINTLEFT$(D$,C+1);:PRINTA$;
57 PRINT"";
58 PRINTLEFT$(U$,C);:PRINTA$;
59 NEXT C:PRINT"[156]";
60 RETURN
61 CONT
62 PRINTSPC(20-LEN(A$)/2)A$;
63 RETURN
64 GETKE$:IFKE$=""THEN64
65 RETURN
66 GOSUB51 :PRINT"[146]";:A$="[156][208]RESS ANY KEY WHEN READY"
67 POKE646,4: GOSUB62
68 GOSUB64
69 PRINT"[158]":A$="[210]EADING [196]IRECTORY":GOSUB62 :PRINT
70 X=1
71 OPEN15,8,15,"I":CLOSE15:A$=""
72 OPEN8,8,0,"$0":FORC=1TO8:GET#8,A$:NEXT:C=1:DN$="":FORC=1TO16
73 GET#8,A$:DN$=DN$+A$:NEXT:GET#8,A$:GET#8,A$:GET#8,A$
74 DN$=DN$+A$:GET#8,A$:DN$=DN$+A$:GET#8,A$:GET#8,A$:DN$=DN$+"/"+A$
75 GET#8,A$:DN$=DN$+A$:GET#8,A$:C=1:PRINT"[196]ISK [212]ITLE ---> [156]"DN$:PRINT
76 FORH=1TO4:GET#8,A$:NEXT
77 GET#8,A$:IFST<>0THEN88
78 IFA$=""THEN88
79 IFASC(A$)<>34THEN77 :REM LOO FOR QUOTES
80 GET#8,A$:IFASC(A$)<>34THENPN$=PN$+A$:GOTO80 :REM BUILD NAME TIL QUOTES
81 GET#8,A$:IFASC(A$)=32THEN81 :REM SPACES
82 GET#8,A$:IFA$<>""THEN82
83 PR$(X)=PN$+"":PRINT"";" ";
84 A$=" "+ PN$+"":PRINT"[145]";:GOSUB62
85 PN$="":X=X+1
86 IFST=0THEN76
87 CLOSE8
88 CLOSE8: GOSUB51
89 PRINT"";:A$="[195]HECKING FOR [205]ASTER [195]OMPOSER FILES":GOSUB62 :A=1
90 PRINT
91 FORM=1TOX-1
92 OPEN 8,8,8,PR$(M)+",M,R":IFST<>0THEN99
93 GET#8,L1$:IFL1$=""THEN99
94 IFASC(L1$)<>13THEN99
95 GET#8,L2$:IFL2$=""THEN99
96 IFASC(L2$)<>117THEN99
97 PL$(A)=PR$(M):PRINT"";" "
98 A$=PL$(A):PRINT"[145][145]";:GOSUB62 :A=A+1
99 CLOSE8:L1$="":L2$="":NEXTM
100 GOSUB51 :PRINT"";
101 IFSK=1THENGOTO183
102 IFFY=1THENGOTO180
103 IFFG=1THENGOTO178
104 IFFR=1THENGOSUB166 :GOTO139
105 GOSUB51
106 V=1
107 IFA>32THENA=32
108 FORCA=1TOA-1
109 OV$=""
110 DO$=""
111 RO$="[146]"
112 IFCA>18THENPRINTLEFT$(OV$,CA+3);:GOTO114
113 PRINTLEFT$(DO$,CA+2);
114 IFRIGHT$(PL$(CA),2)=".C"THEN116
115 PRINT""CHR$(CA+64)RO$+" "PL$(CA):GOTO119
116 LE=LEN(PL$(CA))-2
117 PRINT""CHR$(CA+64)RO$+" "LEFT$(PL$(CA),LE)
118 RO$="[146]"
119 NEXT
120 PRINT"";
121 A$="[158][197]NTER YOUR CHOICE":GOSUB62
122 PRINT:PRINT
123 A$=" [210][197][212][213][210][206][158] FOR MENU [211][208][193][195][197][158] WHEN DONE":GOSUB62
124 PRINT"[156]";
125 GETAN$:IFAN$=""THEN125
126 IFAN$=CHR$(13)THENGOSUB51 :GOSUB139
127 IFAN$=" "ANDV =1THENGOSUB51 :GOTO139
128 IFAN$=" "THENFORT=1TOV:PL$(T)=PN$(T):NEXT:A=V-1:FY=1: GOTO171
129 IFASC(AN$)<65THEN125
130 N=ASC(AN$)-64
131 PN$(V)=PL$(N)+""
132 IFN>CA-1THEN125
133 IFN<1THEN125
134 PL$(N)=""+PL$(N)+"":V=V+1
135 GOTO108
136 PRINT"";:A$="[211][208][193][195][197] WILL STOP SONG DURING PLAY":GOSUB62
137 PRINT"";:A$="[204]OADING "+PT$:GOSUB62
138 LOAD PL$(N),8,1
139 PRINT"[158]";:CLOSE15
140 PRINT"[208]LEASE [197]NTER [217]OUR [195]HOICE"
141 PRINT" 1. [195]REATE A NEW DIRECTORY"
142 PRINT" 2. [210]EAD EXISTING DIRECTORY"
143 PRINT" 3. [208]LAY SONGS ON DISK (CREATE NO FILE)"
144 PRINT" 4. [208]LAY ALL SONGS IN DIRECTORY"
145 PRINT" 5. [208]LAY ALL SONGS ON DISK (NO FILE)"
146 PRINT" 6. [197]XIT "
147 GETA$:IFA$=""THEN147
148 IFA$="1"THENFR=1:SK=0:FG=0:FY=0:GOTO66
149 IFA$="2"THENGOTO155
150 IFA$="3"THENSK=0:SK=0:FG=0:FR=0:FY=0 :GOTO66
151 IFA$="4"THENSK=1:GOTO155
152 IFA$="5"THENSD=0:SK=0:FR=0:FY=0: FG=1:GOTO66
153 IFA$="6"THENGOSUB51 :END
154 GOTO147
155 GOSUB51 :A$="[210]EADING DIRECTORY FILE.....":PRINT"":GOSUB62 :CLOSE8
156 OPEN15,8,15,"I0:":OPEN8,8,8,"MMMCAT,S,R":INPUT#15,Y,B$,C,D:CLOSE15:IFY=62THEN158
157 CLOSE8:OPEN8,8,8,"MMMCAT,S,R": PRINT""
158 IFY=62THENPRINT"":A$="[217]OU MUST CREATE A FILE FIRST":GOSUB62 :CLOSE8
159 IFY=62THEN FORDE=1TO2000: NEXTDE:GOSUB51 :CLOSE15:GOTO139
160 INPUT#8,A
161 FORWE=1TOA
162 INPUT#8,PL$(WE)
163 NEXT
164 IFSK=1THENCLOSE8:CLOSE15 :GOTO171
165 CLOSE8:CLOSE15:A=A+1: GOTO105
166 A$="[215]RITING [196]IRECTORY":GOSUB62 : CLOSE8:OPEN15,8,15,"S0:MMMCAT":CLOSE15
167 OPEN8,8,8,"MMMCAT,S,W"
168 PRINT#8,A-1
169 FORQW=1TOA-1:PRINT#8,PL$(QW):NEXTQW
170 CLOSE8:R=0:GOSUB51 :RETURN
171 GOSUB51 :F=1
172 SD=1
173 IFLEFT$(PL$(SD),1)=""THENPL$(SD)=MID$(PL$(SD),2)
174 PT$=PL$(SD)+"":F=1
175 PRINT"";:A$="[211][208][193][195][197] WILL STOP SONG DURING PLAY":GOSUB62
176 PRINT"";:A$="[204]OADING "+PT$:GOSUB62
177 LOADPL$(SD),8,1
178 IFFG=1THENSD=SD+1:IFSD>A-1THEN139
179 IFFG=1THEN184
180 IFFY=1THENSD=SD+1
181 IFSD>ATHEN139
182 GOTO184
183 SD=SD+1:IFSD>ATHENGOTO139
184 GOTO173